package sis.ra.misc;

import sis.ra.utility.Utils;

public class CrowlWikiPage {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		//company name from silicom valley
//		String companynames="23andMe;8x8;Actel;Adaptec;Advanced Micro Devices;Aeluros Inc;Affymetrix;Agami Systems;Agilent Technologies;AiLive;Airgo Networks;" +
//				"Alien Technology;Applied Materials;Aricent;Atari, Inc;Atheros;Attune Systems, Inc;Ausra (company);Azul Systems;BAPCo consortium;" +
//				"BT Managed Security Solutions;Barracuda Networks;Bay Networks;BayTSP;Baynote;Be Inc.;Become.com;Beganto;Bering Truck;" +
//				"Berkeley Design Automation;BigBand Networks;BigMachines;Bills.com;BitPass;Black Angus Steakhouse;Blakely Sokoloff Taylor & Zafman;" +
//				"Blue Coat Systems;Bon App�tit Management Company;Br�derbund;Bytemobile;C-Cube;CKS Group;CPI International;California Bell Company;" +
//				"CashEdge;Cavium Networks;Chordiant;Collarity;Computer Literacy Bookstore;Computerware;Cooley Godward Kronish;Corsair Memory;" +
//				"Daintree Networks;Danger (company);David Bruce Winery;Decillionix;Deuce Snowboards;Divitas Networks;Draper Fisher Jurvetson;" +
//				"ECAD, Inc.;EGain;ESL Incorporated;E cont.;Eton Corporation;Euphonix;Experience Project;Extreme Networks;Facebook;Fenwick & West;" +
//				"FilmLoop;Financial Navigator;Fortinet;Foundry Networks;Foveon;Friendly search;Friendster;Frog design inc.;Fullpower Technologies;" +
//				"Geron Corporation;Google;Gumstix;Hewlett-Packard Company;Hifn;HighBAR Ventures;HighPoint Technologies;Hitachi Data Systems;" +
//				"Hitachi Group;Hobee's Restaurant;IDEO;Ikanos Communications;Integrated Device Technology;Intellisync;Intersil;" +
//				"Interval Research Corporation;Intuit;Inxight;JDS Uniphase;Jameco Electronics;Juniper Networks;Kathryn Kennedy Winery;" +
//				"Kleiner Perkins Caufield & Byers;LSI Corporation;Lam Research;Lee Mendelson Films;Lending Club;Lexar;LifeScan;LightSurf;" +
//				"Linear Technology;LinkedIn;Liquid Engines;Macrovision;Magellan Navigation;Marvell Technology Group;Maxim Integrated Products;Maxtor;" +
//				"McAfee;Mercury Interactive;MicroUnity;Minerva Networks;Mint.com;Mirapoint;MontaVista Software;Montalvo Systems;Mountain Winery;" +
//				"Mozilla Corporation;M cont.;Mu Dynamics;Multiven;Multiverse Network;Nanosolar;National Semiconductor;NeoEdge Networks;NeoMagic;" +
//				"NetApp;Netflix;Netgear;Noventi;OCZ Technology;ODesk;Ooma;Opsware;Oracle Corporation;PANTA;PGP Corporation;PLX Technology;Packeteer;" +
//				"Palm, Inc.;Pano Logic, Inc.;Pascal Photocoagulator;PayPal;Phoenix Technologies;Picchetti Brothers Winery;Plaxo;PointCast (dotcom);" +
//				"PortalPlayer;Powerset (company);Printers Inc. Bookstore;Proofpoint, Inc.;Quack.com;Qualys;Quikcycle;ROLM;Rambus;SRI International;" +
//				"SanDisk;Savannah-Chanelle Vineyards;ScanSafe;Sequoia Capital;Sharpcast;SiBEAM;Sigma Designs;Silicon Graphics, Inc.;" +
//				"Silicon Valley Power;Silvaco;Simics;Simucad;Solectron;SonicWALL;Sonoma Wire Works;SourceForge, Inc.;Space Systems/Loral;" +
//				"Sparkfactor Design;Stanford Research Systems;SugarCRM;Sun Microsystems;Symantec;Symyx Technologies;Synaptics;Synopsys;Synplicity;" +
//				"Tacit Software;TechShop;Technical Communities;Terayon;TheFind.com;TiVo;TigerLogic;Tiny Software;Total Phase;Transmeta;Trend Micro;" +
//				"T cont.;TuVox;Ubicom;Uloop;Untangle;User:Baerjamin/Pano Logic;User:Builderbug/Sandbox;VMware;Varian Medical Systems;Varian, Inc.;" +
//				"Venrock;Veraz Networks;VeriSign;Veritas Software;Vhayu;V cont.;Vimo;Vitalect;VoiceObjects;Volterra Semiconductor;Vuze, Inc.;WebEx;" +
//				"White Sierra;Wilson Sonsini Goodrich & Rosati;Y Combinator;Yahoo!;YouSendIt;Zultys;SAP AG";
//		String companynames="SAP AG;Oracle Corporation;IBM;Microsoft;HP;DELL;Xerox;Sun Microsystems Inc;Seagate Technology;Apple Inc;Google;Ask.com;MSN;Yahoo;AOL;Facebook;Walmart;Costco;Target;" +
//				"Verizon;AT&T;Sprint Nextel Corp.;T-Mobile_(USA);Alltel";
		String companynames="Google;Amazon.com;Liberty Media;eBay;Yahoo!;Microsoft;Oracle Corporation;Symantec;SAP AG;ExxonMobil;Chevron Corporation;ConocoPhillips;Valero Energy Corporation;Marathon Oil;Sunoco;Hess Corporation;Tesoro;Murphy Oil;Western Refining;Frontier Oil";
		String [] companys=companynames.split(";");
	
		for (int i=0;i<companys.length;i++)
		{
			String company=companys[i];
			String wikipage="http://en.wikipedia.org/w/api.php?action=query&prop=revisions&titles=API|"+company.replace(" ", "%20")+"&rvprop=content&format=xml";
			String wikicontent=Utils.fetchContentfrURL(wikipage);
			if (wikicontent.length()<10) System.out.println(wikipage);
			Utils.writeFile("C:\\Documents and Settings\\I820753\\Desktop\\dataset\\"+company+".wiki", wikicontent);
		}
		System.out.println(companys.length);

	}

}
